import React, { Component } from 'react';
import styles from './Item.module.css'
class Index extends Component {
    render() {
        return (
            <div >
                <div onClick={this.handleId.bind(this,this.props.data.id)}>
                <img className={styles.img} src={this.props.data.coverImgUrl} alt="" />
                <div className={styles.title}>{this.props.data.name}</div>
                </div>
            </div>
        );
    }
    handleId=(id)=>{
        console.log(id);
    }
}

export default Index;

